home *** CD-ROM | disk | FTP | other *** search
/ NBC Slam Jams! / NBC Slam Jams!.iso / xtras / media_la / effector.cst / 00023_Script_Rollover Swirl < prev    next >
Text File  |  1997-09-30  |  2KB  |  58 lines

  1. -- Rollover -> Swirl
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Property pSpeed,pAmount,pInterp
  8.  
  9. on getPropertyDescriptionList
  10.   if not alphamaniacCheck(the currentSpriteNum) then exit
  11.   
  12.   set pList=[:]
  13.   addProp pList,#pAmount,[format:#integer,¼
  14.                                comment:"Amount:",¼
  15.                                Default:180,range:[min:0,max:360]]
  16.   
  17.   addProp pList,#pSpeed,[format:#integer,¼
  18.                                comment:"Frames to complete:",¼
  19.                                Default:30]
  20.   
  21.   addProp pList,#pInterp,[format:#symbol,¼
  22.                                comment:"Interpolation:",¼
  23.                                Default:#On,range:[#Off,#On,#Paused]]
  24.   
  25.   return pList
  26. end
  27.  
  28. on beginSprite me
  29.   set s=the spriteNum of me
  30.   if not alphaManiac(s) then exit
  31.   
  32.   set pInterp=interpolation(pInterp)
  33.   Swirl(sprite s,[degrees:pAmount])
  34. end
  35.  
  36. on mouseEnter me
  37.   set s=the spriteNum of me
  38.   if not alphaManiac(s) then exit
  39.   
  40.   set cmds=[animMode:#Range,startDegrees:pAmount,¼
  41.               endDegrees:0,numFrames:pSpeed,EaseIn:4,EaseOut:4,Interpolation:pInterp]
  42.   Swirl(sprite s,cmds)
  43. end
  44.  
  45. on mouseLeave me
  46.   set s=the spriteNum of me
  47.   if not alphaManiac(s) then exit
  48.   
  49.   set cmds=[animMode:#Range,startDegrees:0,endDegrees:pAmount,¼
  50.               numFrames:pSpeed,EaseIn:4,EaseOut:4]
  51.   Swirl(sprite s,cmds)
  52. end
  53.  
  54. on getBehaviorDescription me
  55.   set msg= "This behavior swirls a sprite, and then, if  the mouse is over, it dramatically unswirls.  Simply set the initial swirl, and how fast you want the sprite to unfold."
  56.   return(msg)
  57. end
  58.